package com.liuzh.kaoyanspringboot.mapper;

import com.liuzh.kaoyanspringboot.entity.CollectArticle;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 刘志鸿
 * @since 2023-03-15
 */
@Mapper
public interface CollectArticleMapper extends BaseMapper<CollectArticle> {

    boolean deleteByCollectId(@Param("collectId") Integer collectId);

    List<Integer> selectByCollectId(@Param("collectId")  Integer collectId);

    Integer selectByOthers(@Param("articleId") Integer articleId,@Param("collectId") Integer collectId);

    boolean deleteByOthers(@Param("articleId") Integer articleId,@Param("collectId") Integer collectId);

    boolean insertByOthers(@Param("articleId") Integer articleId,@Param("collectId") Integer collectId);
}
